//
//  FilePathUtilities.h
//  SoMusic
//
//  Created by SoMusic on 10-7-6.
//  Copyright 2010 cc_team. All rights reserved.
//

#ifndef	CC_FILE_PATH_UTILITIES
#define	CC_FILE_PATH_UTILITIES

#include "CCAll.h"

#ifdef OBJC_MACRO
#import <Foundation/Foundation.h>

//应用程序目录
#define	APP_DIR		[[NSBundle mainBundle] bundlePath]
//资源目录
#define	RES_DIR		[[NSBundle mainBundle] resourcePath]

@interface FilePathUtilities : NSObject 
{
	
}

//获取应用程序的文档目录
+ (NSString *)getDocumentDirectory;
#define	GET_DOC_DIR			getDocumentDirectory

//获取应用程序文档目录中某个指定文件全路径
+ (NSString *)getFileFullPathInDocument:(NSString *)fileName;
// 获取配置文件所在路径：非越狱手机，得到的是Document目录的位置，越狱手机得到的是Document目录的上级目录
+ (NSString *)getFileFullPath:(NSString *)fileName;

// 获取目录的父目录名称
+ (NSString *)getParentFolderName:(NSString *)folderPath;

//如果配置文件在Document目录中不存在，那么拷贝一份
+ (BOOL)copySettingFileToDocumentFolderIfNotExist:(NSString *)fileName;

+ (BOOL)copySettingFileToDocumentFolder:(NSString *)fileName;

//删除指定位置的文件
+ (BOOL)deleteFileInDocFoler:(NSString *)fileName;
+ (BOOL)deleteFileInFolder:(NSString *)foler withFileName:(NSString *)fileName;

@end

#endif	//OBJC_MACRO
#endif	// CC_FILE_PATH_UTILITIES
